Refactors url parsing to use the WHATWG URL API#174
Refactors url parsing to use the WHATWG URL API#174Alpha4615 wants to merge 2 commits intoOP-Engineering:mainfrom
Conversation
|
Also, just to note, the WHATWG URL API became standard in NodeJS 10, released in April 2018, so that's pretty long ago -- and well below the version requirement of 18 that's specified in the package.json, so there really shouldn't be back-compat issues with merging this PR. |
|
The problem is not node compat but react native |
|
What if I change it so it uses the polyfill only if necessary, otherwise it uses WHATWG? Would that be acceptable?
|
…with react-native)
|
I have modifed the PR to use WHATWG if it's available, and if not, it uses the legacy url library. This should prevent react-native compat issues. |
|
No, react native includes a URL object in the global namespace but it does not behave like the standard, it might have other issues https://github.com/charpeni/react-native-url-polyfill Sorry dude... not worth the headache to fix what is not broken. |
|
Also, already commented this on previous PR that attempted the same |
This refactors the library to remove the url polyfill and replace it with the native WHATWG URL API. It mitigates potential security issues and removes an unnecessary dependency, which cascades into smaller bundle sizes and lower maintenance monitoring requirements.
This will remove the deprecation error seen in newer versions of nodejs. This will not cause any compatibility issues as the API is supported by the library's current minimum nodeJS version (Node 18).
All unit tests pass locally, but may not pass on GH due to bot detection.
Fixes #172.